package com.supper;

import com.supper.javaconfig.AppConfig;
import com.supper.javaconfig.PersonC;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author yutao
 * @since 2020/4/13 4:16 下午
 */
public class ConfigTest {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

        PersonC personC = (PersonC) applicationContext.getBean("personC");
        System.out.println(personC);
        System.out.println(personC.getCarC());
    }

}
